//----------from对像---------------------
var NKFormHtml = Class.create({
    version: '1.0',
    initialize : function(dbModel) {
    	this.target = dbModel.target;//表单id
    	this.rurl=dbModel.rurl;
    	this.onSuccess=dbModel.onSuccess;//成功时的回调方法
    	this.onFailure = dbModel.onFailure;//失败时回调方法
    	this.onsubmit = dbModel.onsubmit;//提交时调用方法
    	this.serverVeriList = [];//服务器验证
    	this.nosubmit = dbModel.nosubmit;//不提交标识
    	this.stopinfo = (undefined == dbModel.stopinfo?false:dbModel.stopinfo);
    	this.nkids = dbModel.nkids;
    	this.formtempid = 1;
    	this.noveri = [];//不需要验证的id
    	this.alData = [];//提交数据
    	this.altForm = dbModel.altform || [];//提交的form表单
    },
    //--------------表单初始化------------------------------------------------------
    show : function(){
    	var self = this;
    	self.EventForm();
    },
    ClearForm : function(ids){//aa,aaa
    	var nids = '';
    	var self = this;
    	if(undefined!=ids){
    		nids = ','+ids+',';
    	}
    	$$('#'+self.target+' input,select,textarea').each(function(alink,index) {
    		try{
    			if(nids.indexOf(','+alink.id+',')==-1){//不在排除范围内
		    		alink.veri();//调用成功说明是基础控件
		    		try{alink.setValue('',true);}catch(a){}
					try{alink.setValue('','');}catch(a){}
					try{alink.setValue('');}catch(a){}
					try{
						if(alink.type!='checkbox' && alink.type!='radio'){
							alink.value='';
						}
					}catch(a){}
    			}
    		}catch(e){}
    	});
    },
    //-----------是否需要验证---------------------------------------------------
    noVeriFunction : function(id){
    	var self = this;
    	var noveri = self.noveri;
    	if(undefined != noveri && noveri.length>0){
    		for(var i=0;i<noveri.length;i++){
    			if(noveri[i]==id){//不需要验证
    				return true;
    			}
    		}
    	}
    	return false;//需要验证
    },
    FormSubmit : function(furl,asynchronou){
    	var idx=0;
    	var pars=[];
    	var self=this;
    	var b=true;
    	var sidx=0;
    	if(!self.stopinfo){
    		self.showLoad();//显示加载提示
    	}
    	//----------------外部数据-------------------------------------------------
    	var adata  = self.altData();
    	if(undefined!=adata){
    		pars[idx++]=adata;
    	}
    	//----------------内部数据-------------------------------------------------
    	$$('#'+self.target+' input,select,textarea').each(function(alink,index) {
    		if(self.checkSubmitForm(alink)){
	    		//-------------验证-------------------------------------------------
	    		try{
	    			if(!self.noVeriFunction(alink.id)){
		    			if(b)
		    				b=alink.veri();
		    			else
		    				alink.veri();
		    			try{
		    				if(alink.isServer()){//为服务器验证
		    					self.serverVeriList[sidx++] = alink.id;
		    				}
		    			}catch(e){}
	    			}
	    		}catch(e){}
	    		//------------------------------------------------------------------
	    		if(alink.type=='checkbox' || alink.type=='radio'){
	    			if(alink.checked)
	    				pars[idx++]='&'+alink.name+'='+alink.value;
	    		}else if(alink.value.trim().length>0){
	    			pars[idx++]='&'+alink.name+'='+encodeURIComponent(alink.value);
	    		}
    		}
		});
    	if(b){//验证通过提交
    		self.submitForm(furl,pars,asynchronou);//提交	
    	}else{
    		if(!self.stopinfo){
    			self.closeInfo();//关闭消息
    		}
    	}
    	return b;
    },
    //-------------检测提交数据标识-------------------------------------------------
    checkSubmitForm : function(alink){
    	var self = this;
    	var submit = true;
    	if(undefined == self.nosubmit){
    		return true;
    	}
    	alink.ancestors().each(function(ak,index) {
    		if(ak.hasClassName(self.nosubmit)){
    			submit= false;
    			return false;
    		}
		});
    	return submit;
    },
    //-------------提交form-----------------------------------------------------
    submitForm : function(furl,pars,asynchronou){
	    	var self = this;
	    	//----------------------------------------------
	    	var sList = self.serverVeriList;
	    	var isTimout = false;
	    	if(sList.length>0){//有服务器验证方法，需要等待服务器验证返回
	    		for(var i=0;i<sList.length;i++){
	    			if(!$(sList[i]).isVeriEnd()){//如果验证还没有结束,过500毫秒在试
	    				isTimout = true;
	    				setTimeout(function(){
	    					self.submitForm(furl,pars,asynchronou);
	    				}, 500);
	    				break;
	    			}else if(!$(sList[i]).sVerEnd()){//验证结束,但没有通过
	    				if(!self.stopinfo){
	    					self.closeInfo();//关闭消息
	    				}
	    				return;
	    			}
	    		}
	    	}
	    	if(isTimout)//不需要处理
	    		return;
	    	//----------------------------------------------
			if(typeof furl != "undefined"){
				$(self.target).action=furl;
			}
			//---------------------------------------------
			var pastr = pars.join('');
			if(pastr.startsWith('&')){
				pastr=pastr.substring(1);
			}
			//---------------------------------------------
	    	new Ajax.Request($(self.target).action, {
	        parameters: pastr,
	        method:'post',
	        asynchronous:(undefined==asynchronou?true:asynchronou),//是否异步提交
	        onSuccess: function(response) {
	        	self.closeInfo();//关闭消息
	        	try{
	        		if(self.onSuccess!=undefined)
	        			self.onSuccess(response);
	        		else{
	        			var vjson = response.responseText.evalJSON();//{show:'',msg:'',ahid:3}
	        			if(!self.stopinfo){
		        			if(vjson.s=='erro'){
		        				if(vjson.a!=undefined)//自动隐藏时间
		        					self.showErro(vjson.m,vjson.a);
		        				else
		        					self.showErro(vjson.m);
		        			}else if(vjson.s=='success'){
		        				if(vjson.a!=undefined)//自动隐藏时间
		        					self.showInfo(vjson.m,vjson.a);
		        				else
		        					self.showInfo(vjson.m);
		        			}
	        			}
	        		}
	        	}catch(e){}
	        },
	        onFailure : function(response) {
	        	if(!self.stopinfo){
	        		self.closeInfo();//关闭消息
	        	}
	        	if(self.onFailure!=undefined)
	        		self.onFailure(response);
	        }
		});
    },
    //---------------验证表单------------------------------------------------------
    CheckFormData : function(){
    	var self = this;
    	var b=true;
    	$$('#'+self.target+' input,select,textarea').each(function(alink,index) {
    		//-------------验证-------------------------------------------------
    		try{
    			if(!self.noVeriFunction(alink.id)){
	    			if(b)
	    				b=alink.veri();
	    			else
	    				alink.veri();
    			}
    		}catch(e){}
		});
    	return b;
    },
    //--------------附加数据-------------------------------------------------------
    altData : function(){
    	var self = this;
    	var idx = 0;
    	var par = [];
    	var sdata = self.alData;//[{'name':'sff'}]
    	var altForm = self.altForm;//['','']
    	//------------外部数据----------------------------------------------------
    	if(undefined!=sdata){
    		try{
	    		for(var i=0;i<sdata.length;i++){
	    			var skeys =  Object.keys(sdata[i]);
	        		for(var a=0;a<skeys.length;a++){
	        			par[idx++]='&'+skeys[a]+'='+sdata[i][skeys[a]];
	        		}
	    		}
    		}catch(e){}
    	}
    	//-----------外部表单------------------------------------------------------
    	if(undefined!=altForm){
    		try{
	    		for(var i=0;i<altForm.length;i++){//遍历表单
	    			var fdata = self.getFormData(altForm[i]);
	    			if(undefined!=fdata){
	    				for(var n=0;n<fdata.length;n++){//遍历表单行
		    				var vobj = fdata[n];
		    				for(var a=0;a<vobj.length;a++){//遍历表单每一行数据
		    					var vrobj = vobj[a];
		    					var skeys = Object.keys(vrobj);
		        	    		for(var c=0;c<skeys.length;c++){
		        	    			par[idx++]='&'+skeys[c]+'='+vrobj[skeys[c]];
		        	    		}
		    				}
	    				}
	    	    	}
	    		}
    		}catch(e){}
    	}
    	return par.join('');
    },
    //--------------加载事件-------------------------------------------------------
    EventForm : function(){
    	var self = this;
    	$(self.target).showInfo=function(a,b){//显示信息
    		self.showInfo(a,b);
    	};
    	$(self.target).showErro=function(a,b){//显示错误信息
    		self.showErro(a,b);
    	};
    	$(self.target).showLoad=function(){//显示等待信息
    		self.showLoad();
    	};
    	$(self.target).closeInfo=function(){//关闭显示信息
    		self.closeInfo();
    	};
    	$(self.target).setnoveri=function(a){//不需要验证的控件id
    		self.noveri = a;
    	};
    	$(self.target).setAdditiData=function(a){//设置提交数据
    		self.alData = a;
    	};
    	$(self.target).setAdditiForm=function(a){//设置提交表单
    		self.altForm = a;
    	};
    	$(self.target).clearALdata=function(){//清空附加数据
    		self.alData=[];
    		self.altForm =[];
    	};
    	$(self.target).ajaxSubmit=function(furl,asynchronou){//ajax方式提交数据
    		if(typeof self.onsubmit != "undefined"){
    			if(self.onsubmit()){//外部方法返回true
    				return self.FormSubmit(furl,asynchronou);
    			}
    		}else{
    			return self.FormSubmit(furl,asynchronou);
    		}
    	};
    	//----------清空表单内的控件值---------------------------------------------
    	$(self.target).clearValue = function(ids){//清空值
    		self.ClearForm(ids);
    	};
    	//-----------提交时验证值的合法性---------------------------------------------
    	$(self.target).observe('submit',function(event){//在提交数据的时候进行验证
    		var isSubmit = false;
    		if(typeof self.onsubmit != "undefined"){
    			isSubmit=self.onsubmit();//自定义
    		}
    		if(isSubmit){
    			isSubmit = self.CheckFormData();
    		}
    		if(!isSubmit)
    			Event.stop(event);//有错误时停止提交
    		else
    			return true;
        });
    	//---------------插入一个空白行----------------------------------------
    	$(self.target).inertBackBody = function(a,b){
    		self.inertBackBody(a,b);
    	};
    	//-----------------------------------------------------------------
    	$(self.target).deleteFormBody = function(a){
    		self.deleteFormBody(a);
    	};
    	//--------------插入单行数据-------------------------------------------
    	$(self.target).insertData = function(a,b){
    		self.insertData(a,b);
    	};
    	//--------------插入多行数据--------------------------------------------
    	$(self.target).insertDatas = function(a){
    		self.insertDatas(a);
    	};
    	//-------------插入数据-----------------------------------------------
    	$(self.target).inertDataRow = function(a,b){
    		self.inertDataRow(a,b);
    	};
    	//--------------获取数据----------------------------------------------
    	$(self.target).getFormData = function(){
    		return self.getFormData();
    	};
    	//--------------重置动态表单--------------------------------------------
    	$(self.target).resetFormBody = function(){
    		self.resetFormBody();
    	};
    },
    //---------------获取表单数据--------------------------------------------------
    getFormData : function(formid){
    	var self = this;
    	var data = [];
    	var idx = 0;
    	var re = false;
    	var sformid = (undefined==formid?self.target:formid);
    	$$('#'+sformid+' div[id^='+sformid+'_jsbody_]').each(function(row,ridx) {//行
    		var rdata = [];
    		var ridx = 0;
    		$$('#'+row.id+' input,select,textarea').each(function(alink,index) {//列
    			try{
    				var bcheck = true;
    				try{bcheck =alink.veri();}catch(e){}
    				//-------------------是否需要验证---------------------------------
    				if(!bcheck && !self.noVeriFunction(alink.id)){//需要验证,并且验证未通过
    					re = true;
    					return;
    				}
    				//--------------------获取值-------------------------------------
    				var obj = ('{"'+alink.name+'":"'+alink.value+'"}').evalJSON();
	    			if(alink.type=='checkbox' || alink.type=='radio'){
	    				if(alink.checked){
	    					rdata[ridx++] =obj;
	    				}
	    	    	}else if(alink.type!='button'){
	    	    		rdata[ridx++] = obj;
	    	    	}
	    			//-------------------------------------------------------------
    			}catch(e){}
    		});
    		data[idx++] = rdata;
    	});
    	if(re){
    		return;
    	}
    	return data;
    },
    //---------------删除--------------------------------------------------------
    deleteFormBody : function(a){
    	var self = this;
    	var row=$(self.target+'_jsbody_'+a);
    	if(undefined!=row){
    		row.remove();
    	}
    },
    //--------------重置方法----------------------------------------------------
    resetFormBody : function(){
    	var self = this;
    	self.formtempid=1;
    	$$('#'+self.target+' div[id^='+self.target+'_jsbody_]').each(function(row,ridx) {//行
    		if(undefined!=row){
    			var rowIndex = row.id.substring(row.id.lastIndexOf('_')+1,row.id.length);
    			if(rowIndex>0){
    				row.remove();
    			}
        	}
    	});
    },
	//-----------插入空白行-----------------------
	inertBackBody : function(a,b){
		var self = this;
		if(undefined==a){
			a=1;
		}
		for(var i=0;i<a;i++){
			self.inertFormBody(a,b);
		}
	},
	//-----------插入数据行---------------------------------
	inertDataRow : function(a,b){//[[{},{}]]
		var self = this;
		if(undefined != a){
			for(var i=0;i<a.length;i++){
				self.inertFormBody(a[i],b);
			}
		}
	},
    //---------------添加表格对象---------------------------------------------------
    inertFormBody : function(a,b){//[name:'',value:''}]   b = ['id1','id2']
    	var self = this;
    	var formBody = $(self.target+'_formbody');//表单体
    	var srcBody = $(self.target+'_jsbody_0');//原始内容
    	var ids = self.nkids;
    	var nids = [];
    	var idx = 0;
    	var startIdx = self.formtempid;
    	var instr = '<div id="'+self.target+'_jsbody_'+startIdx+'" style="'+srcBody.style.cssText+'" class="'+srcBody.className+'">'+srcBody.innerHTML+'</div>';
    	for(var i=0;i<ids.length;i++){
    		var vid = ids[i].id;
    		var reg = new RegExp(vid,'g');
    		var inid = self.target+'_'+vid+'_nkADinsert_'+startIdx;
    		var iobj = Object.clone(ids[i]);
    		iobj.id = inid;
    		iobj.value = self.findValue(a,iobj);
    		iobj.svalue = self.findsValue(a,iobj);
    		nids[idx++]=iobj;
    		instr=instr.replace(reg,inid);
    	}
    	formBody.insert(instr);//插入内容
    	$(self.target+'_jsbody_'+startIdx).fire("widget:noka_reinit", { widgetNumber: nids});//触发控件初始事件
    	self.hideInput(b,startIdx);
    	self.formtempid++;//控件主键加1
    },
    //-------------------------------------------------------------------------
    hideInput : function(b,startIdx){
    	var self = this;
    	if(undefined!=b){
    		for(var i=0;i<b.length;i++){
    			try{$(self.target+'_'+b[i]+'_nkADinsert_'+startIdx).hide();}catch(e){}
    		}
    	}
    },
    //-------------------------------------------------------------------------
    findValue : function(olist,iobj){
    	var self = this;
    	var name = iobj.name;
    	if(undefined!=olist){
	    	for(var i=0;i<olist.length;i++){
	    		if(self.subName(olist[i].name,name)){//user[1].sex == user[0].sex  name.sub
	    			iobj.name = olist[i].name;
	    			return olist[i].value;
	    		}
	    	}
    	}
    },
    findsValue : function(olist,iobj){
    	var self = this;
    	var name = iobj.name;
    	if(undefined!=olist){
	    	for(var i=0;i<olist.length;i++){
	    		if(self.subName(olist[i].name,name)){
	    			iobj.name = olist[i].name;
	    			return olist[i].svalue;
	    		}
	    	}
    	}
    },
    subName : function(oname,name){
    	if(oname == name){
    		return true;
    	}
    	try{
    		var vnub = oname.substring(oname.indexOf('[')+1,oname.indexOf(']'));//获取数组中的下标
    		var ename = name.substring(name.indexOf(']'),name.length);
    		var sname = name.substring(0,name.indexOf('[')+1);
    		if(oname==(sname+vnub+ename)){
    			return true;
    		}
    	}catch(e){}
    	return false;
    },
    //------------插入数据--------------------------------------------------------
    insertData : function(idx,da){//行号,[{name:'',value:''}]
    	var self = this;
    	if(undefined!=idx,undefined!=da){
	    	$$('#'+self.target+'_jsbody_'+idx+'  input,select,textarea').each(function(alink,index) {
	    		try{
	    			for(var i=0;i<da.length;i++){
	    				var db = da[i];
	    				if(db.name==alink.name){
	    					if(alink.type=='radio' || alink.type=='checkbox'){
	    						try{alink.parentNode.parentNode.setValue(db.value);}catch(e){}
	    					}else{
	    						$(alink).setValue(db.value);
	    					}
	        				break;
	        			}
	    			}
	    		}catch(e){}
			});
    	}
    },
    //-----------批量插入数据--------------------------------------------------------
    insertDatas : function(da){//[{idx:'',row:[]}]
    	var self = this;
    	if(undefined!=da){
	    	for(var i=0;i<da.length;i++){
	    		var dc = da[i];
	    		var idx = dc.idx;//行号
	    		var data = dc.row;//数据
	    		self.insertData(idx,data);
	    	}
    	}
    },
    //--------------显示加载提示----------------------------------------------------
    showLoad : function(){
    	var self = this;
    	var postition = self.divMsg();
    	//xiefangjian
		NokaBox.box.show({html:'<img alt="" src="'+self.rurl+'/nokatag/tablegrid/images/mtg-loader.gif"/>load...',animate:1,fixed:false,close:false,mask:false,boxid:'success',top:postition.top,left:postition.left});//显示等待消息
    },
    //--------------显示消息----------------------------------------------------
    showInfo : function(htmls,ahid){
    	var self = this;
    	if(typeof ahid=="undefined")
    		ahid=2;
    	var postition = self.divMsg();
    	NokaBox.box.show({html:htmls,fixed:false,close:false,mask:false,autohide:ahid,boxid:'success',animate:1,top:postition.top,left:postition.left});//显示消息
    },
    //--------------显示错了消息-------------------------------------------------
    showErro : function(htmls,ahid){
    	var self = this;
    	if(typeof ahid=="undefined")
    		ahid=2;
    	var postition = self.divMsg();
    	try{
		NokaBox.box.show({html:htmls,fixed:false,close:false,mask:false,autohide:ahid,boxid:'error',animate:1,top:postition.top,left:postition.left});//显示错误消息
    	}catch(e){}
    },
    //--------------关闭消息----------------------------------------------------
    closeInfo : function(){
    	try{
    		NokaBox.box.hide();
    	}catch(e){}
    },
    //---------------div定位---------------------------------------------------
    divMsg : function(){
    	var self = this;
    	var postition={top:0,left:0};
    	try{
	    	var msgDiv = $(self.target+'_msg');
	    	if(msgDiv!=undefined){
	    		postition.top = msgDiv.positionedOffset().top+msgDiv.offsetHeight+5;
	    		postition.left=msgDiv.positionedOffset().left+msgDiv.offsetWidth+5;
	    	}
    	}catch(e){}
    	return postition;
    }
});
//=======================================================
var NKFormDelButton = Class.create({
    version: '1.0',
    initialize : function(cfg) {
    	this.cfg = cfg;
    	this.id = cfg.id;
    	this.formid = cfg.formid;
    },
    show : function(){
    	var self = this;
    	self.hideButton();
    	self.eventFormDel();
    },
    //---------------删除表单对象----------------------------------
    deleteFormBody : function(){
    	var self = this;
    	var parnts = $(self.id).ancestors();
    	for(var i=0;i<parnts.length;i++){
    		var pa = parnts[i];
    		if(pa.id.indexOf(self.formid+'_jsbody_')!=-1){
    			pa.remove();
    			return;
    		}
    	}
    },
    //---------------hide--------------------------------------
    hideButton : function(){
    	var self = this;
    	var parnts = $(self.id).ancestors();
    	$(self.id).show();
    	for(var i=0;i<parnts.length;i++){
    		var pa = parnts[i];
    		if(pa.id.indexOf(self.formid+'_jsbody_0')!=-1){
    			$(self.id).hide();
    			return;
    		}
    	}
    },
    //---------------------------------------------------------
    eventFormDel : function(){
    	var self = this;
    	//-----------------------------------------------------------
    	$(self.id).observe('click',function(){
    		self.deleteFormBody();
    	});
    	//-----------------------------------------------------------
    	document.observe('widget:noka_reinit',function(event){//失失焦点时验证其值
        	if(self.id.indexOf('_nkADinsert_')==-1){
     	    	var npfffs=event.memo.widgetNumber.clone();
     	    	for(var i=0;i<npfffs.length;i++){
     	    		var cfgid = Object.allclone(self.cfg);
     	    		var initem = npfffs[i];
     	    		cfgid.id = initem.id;
     	    		if(cfgid.id.indexOf('_'+self.id+'_')!=-1){
     	    			(new NKFormDelButton(cfgid)).show();
     	    		}
     	    	}
        	}
        });
    }
});
//=======================================================
function nk_form_button_ajaxSubmit(formid,url){
	$(formid).ajaxSubmit(url);
}
//=====================input msg=========================
function  noka_DLSH89UY76HJH_msgshow(tid,url,msg,isb){
	var t = document.getElementById(tid+'_image'); 
	var p = document.getElementById(tid+'_msg'); 
	if(''==p.innerHTML){
    	var idx=0;
    	var html=[];
    	var img=url+'/nokatag/formcheck/images/error-tip-corners.gif';
    	html[idx++]='<table  border="0" cellpadding="0" cellspacing="0"   id="table_id">';
		html[idx++]='<tr>';
		html[idx++]='  <td style="background:url('+img+') no-repeat 0 0px; width:6px; height:6px;"></td>';
		html[idx++]='  <td style="background:url('+img+') repeat-x  0 -12px;height:6px; " ></td>';
		html[idx++]='  <td style="background:url('+img+') no-repeat  -494px  0px;height:6px; width:6px;"></td>';
		html[idx++]=' </tr>';
		html[idx++]=' <tr>';
		html[idx++]=' <td  style="background:url('+img+') repeat-y  0px -25px;height:6px; "></td>';
		html[idx++]=' <td "+msgBgPrave+" style="background:#FFFFFF">';
		html[idx++]=' 		<table border="0" cellpadding="0" cellspacing="0">';
		html[idx++]=' 		<tr>';
		html[idx++]=' 		<td valign="top" width="20px">';
		html[idx++]='<img src="'+url+'/nokatag/formcheck/images/exclamation.gif" width="16" height="16" align="absmiddle"/>&nbsp;&nbsp;';
		html[idx++]='</td><td id="si_erromesage" >';
		html[idx++]=msg;
		html[idx++]='</td></tr></table>';
		html[idx++]='  </td>';
		html[idx++]=' <td style="background:url('+img+') no-repeat  -494px  -24px;height:6px; width:6px;"></td>';
		html[idx++]=' </tr>';
		html[idx++]=' <tr>';
		html[idx++]='  <td style="background:url('+img+') repeat-y  0px -6px;height:6px;"></td>';
		html[idx++]=' <td style="background:url('+img+') repeat-x  0px -18px;height:6px;"></td>';
		html[idx++]=' <td style="background:url('+img+') no-repeat  -494px -6px;height:6px;"></td>';
		html[idx++]='</tr>';
		html[idx++]='</table>';
		p.innerHTML=html.join('');
	}
	if(isb){
		var top1 = noka_tag_LJKFS24783SFJKL_getTop(t);
		var left1 = noka_tag_LJKFS24783SFJKL_getLeft(t);
		var top2 = 0;
		var left2 = 0;
		if (p.offsetParent != null) {
			top2 = noka_tag_LJKFS24783SFJKL_getTop(p.offsetParent);
			left2 = noka_tag_LJKFS24783SFJKL_getLeft(p.offsetParent);
		}
		p.style.left=(left1 - left2)+16;
		p.style.top=(top1 + t.offsetHeight - top2);
		p.style.display = 'block';
	}else{
		p.style.display = 'none';
	}
}
function noka_SDF5SDFL23JLSDGSD7DSMQS324SDSDFN_issuc(tid,isb){
	if(isb){//通过验证
		document.getElementById(tid).className=document.getElementById(tid).tempclass;
		document.getElementById(tid+'_image').style.display = 'none';
		document.getElementById(tid+'_check').value='no';
	}else{//未通过验证
		document.getElementById(tid).className='noka_inputclassname_LJKSDFJKLSDF8234ZX12890BJKSDFSDF_erro';
		document.getElementById(tid+'_image').style.display = 'block';
		document.getElementById(tid+'_check').value='yes';
	}
}
//===============获取绝对位置=================================
function noka_tag_LJKFS24783SFJKL_getTop(el){
	var top = el.offsetTop;
		if (el.offsetParent != null) 
			top += noka_tag_LJKFS24783SFJKL_getTop(el.offsetParent);
	return top;
}
function noka_tag_LJKFS24783SFJKL_getLeft(el) {
	var left = el.offsetLeft;
	if (el.offsetParent != null) 
		left += noka_tag_LJKFS24783SFJKL_getLeft(el.offsetParent);
	return left;
}
//==============textarea=====================================
function nokata_DSFLKJ_gbcount(total,used,remain,myid,msg)
{
	 var max;
	 max = total.value;
	 if (myid.value.length > max) {
		 myid.value = myid.value.substring(0,max);
		 used.value = max;
		 remain.value = 0;
	 }else {
		 used.value = myid.value.length;
		 remain.value = max - used.value;
	 }
}
//==============select=====================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdiv(tid){ 
	noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus(tid);
		var th = $(tid); 
		var t = $(tid+'_show'); 
		var p = $(tid+'_div'); 
	if($(tid+'_div').style.display =='none'){
		$(tid+'_show').style.color='#FFFFFF';
		$(tid+'_div').style.width = $(tid+'_listtable').offsetWidth;
		$(tid+'_show').style.backgroundColor ='#000066';
		var values = $(tid).value;
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist(tid,values);
		var top1 = noka_tag_LJKFS24783SFJKL_getTop(t);
		var left1 = noka_tag_LJKFS24783SFJKL_getLeft(t);
		var top2 = 0;
		var left2 = 0;
		if (p.offsetParent != null) {
			top2 = noka_tag_LJKFS24783SFJKL_getTop(p.offsetParent);
			left2 = noka_tag_LJKFS24783SFJKL_getLeft(p.offsetParent);
		}
		$(tid+'_div').style.left=(left1 - left2);
		$(tid+'_div').style.top=(top1 + t.offsetHeight - top2)+3;
		$(tid+'_div').style.display = 'block';
	}else{
		$(tid+'_div').style.display = 'none';
		$(tid+'_show').style.color='';
		$(tid+'_show').style.backgroundColor = '';
	}
	
}
// ==========按名字选中列表项============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist(ids,values){ 
 	var iss = false; 
	for(i=0;i<$(ids+'_listsize').value;i++){ 
		if($(ids+'_value_'+i).value==values){
			noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(ids+'_list_'+i),ids,i);
			iss = true;
		}
	}
	if(!iss){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(ids+'_list_0'),ids,0);
	}
}
//=================隐藏列表=============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_enddiv(tid,onbl){
	if($(tid+'_input_isonedit').value=='false' ){
		$(tid+'_show').style.color='';
		$(tid+'_show').style.backgroundColor = '';
	}
	if($(tid+'_div_isonedit').value=='true' || $(tid+'_button_isonedit').value=='true' || $(tid+'_div_isonedit').value=='true' ){
	}else{
		$(tid+'_div').style.display = 'none';
		onbl($(tid));
	}
}

//===========改变列表的每行颜色=============
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp(obj,ids,idn){
for(i=0;i<$(ids+'_listsize').value;i++){
		$(ids+'_list_'+i).style.backgroundColor = '#FFFFFF';
		$(ids+'_list_'+i).style.color='#000000';
		$(ids+'_isselected_'+i).value = 'false'; 
	}
	obj.style.backgroundColor = '#000066';
	obj.style.color='#FFFFFF';
	$(ids+'_isselected_'+idn).value = 'true';
}
//===============选择列表数据=============
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_clickhtmlvaluep(obj,ids,idn,oncha){
	noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus(ids);
	$(ids).value = $(ids+'_value_'+idn).value;
	$(ids+'_show').value = $(ids+'_text_'+idn).value;
	$(ids+'_div').style.display = 'none';
	$(ids+'_show').style.backgroundColor = '#000066';
	$(ids+'_show').style.color='#FFFFFF';
	oncha($(ids+'_show'),$(ids));
}
//================查找列表数据项================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_listdata(obj,events){
  _e = events;
  var e = _e.keyCode ? _e.keyCode : _e.which;
	if(e==13 || e==38 || e==40){
	if($(obj.id+'_div').style.display == 'block'){
		for(ns=0;ns<$(obj.id+'_listsize').value;ns++){
			if($(obj.id+'_isselected_'+ns).value=='true'){
				if(e==13){//回车
					obj.value = $(obj.id+'_value_'+ns).value;
					$(obj.id+'_show').value = $(obj.id+'_text_'+ns).value;
					$(obj.id+'_div').style.display = 'none';
					break;
				}else if(e==38){//向上
					noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpup(obj.id,ns);
					break;
				}else if(e==40){//向下
					noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpd(obj.id,ns);
					break;
				}
			}
		}
	  }else{
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdiv(obj.id);
	  };
	}else{
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_clearb(obj);
		for(i=0;i<$(obj.id+'_listsize').value;i++){
			var valuen = $(obj.id+'_value_'+i).value;
			valuen = valuen.substring(0,obj.value.length);
			if(valuen==obj.value){
				noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(obj.id+'_list_'+i),obj.id,i);
				noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdivkeyup(obj.id);
				break;
			}
		}

	}
}
//===========录入傎时显示列表===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdivkeyup(tid){
	var values = $(tid+'_show').value;
	var t = $(tid+'_show'); 
	var p = $(tid+'_div'); 
		var top1 = noka_tag_LJKFS24783SFJKL_getTop(t);
		var left1 = noka_tag_LJKFS24783SFJKL_getLeft(t);
		var top2 = 0;
		var left2 = 0;
		if (p.offsetParent != null) {
			top2 = noka_tag_LJKFS24783SFJKL_getTop(p.offsetParent);
			left2 = noka_tag_LJKFS24783SFJKL_getLeft(p.offsetParent);
		}
	noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_kup(tid,values);
	$(tid+'_div').style.width = $(tid+'_listtable').offsetWidth;
	$(tid+'_div').style.left=(left1 - left2);
	$(tid+'_div').style.top=(top1 + t.offsetHeight - top2)+3;
	$(tid+'_div').style.display = 'block';
}
//=========方向上键==========================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpup(ids,n){
	b = n-1;
	if(b>=0 && b<$(ids+'_listsize').value){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(ids+'_list_'+b),ids,b);
	}
}
//=========方向下键==========================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpd(ids,n){
	b = n+1;
	if(b>=0 && b<$(ids+'_listsize').value){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(ids+'_list_'+b),ids,b);
	}
}
//==========按名字选中列表项============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_kup(ids,values){
	for(var i=0;i<$(ids+'_listsize').value;i++){
		if($(ids+'_list_'+i).value==values){
			noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(ids+'_list_'+i),ids,i);
		}
	}
}
//=========失去焦点===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus(ids){
	$(ids+'_but').blur();
	$(ids+'_show').focus();
}
//========清空样式===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_clearb(obj){
	$(obj.id+'_show').style.color='';
	$(obj.id+'_show').style.backgroundColor = '';
}
//********treeselect********************************
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdiv_mult(tid){ 
	var t = $(tid+'_show'); 
	var th = $(tid); 
	var p = $(tid+'_div'); 
	if($(tid+'_div').style.display =='none'){
		$(tid+'_show').style.color='#FFFFFF';
		$(tid+'_show').style.backgroundColor = '#000066';
		var values = th.value;
		var top1 = noka_tag_LJKFS24783SFJKL_getTop(t);
		var left1 = noka_tag_LJKFS24783SFJKL_getLeft(t);
		var top2 = 0;
		var left2 = 0;
		if (p.offsetParent != null) {
			top2 = noka_tag_LJKFS24783SFJKL_getTop(p.offsetParent);
			left2 = noka_tag_LJKFS24783SFJKL_getLeft(p.offsetParent);
		}
		$(tid+'_div').style.left=(left1 - left2);
		$(tid+'_div').style.top=(top1 + t.offsetHeight - top2)+3;
		$(tid+'_div').style.display = 'block';
	}else{
		$(tid+'_div').style.display = 'none';
		t.style.color='';
		t.style.backgroundColor = '';
	}
}
//=================隐藏列表=============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_enddiv_mult(tid,onbl){
	if($(tid+'_but_isonedit').value=='false' ){
		$(tid+'_show').style.color='';
		$(tid+'_show').style.backgroundColor = '';
	}
	if($(tid+'_show_isonedit').value=='true' || $(tid+'_but_isonedit').value=='true' || $(tid+'_div_isonedit').value=='true' ){
	}else{
		$(tid+'_div').style.display = 'none';
		onbl($(tid+'_show'));
	}
}

//===============选择列表数据=============
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_clickhtmlvaluep_mult(ids,val,sval,oncha){
	$(ids+'_show').style.backgroundColor = '#000066';
	$(ids+'_show').style.color='#FFFFFF';
	$(ids+'_show').focus();
	$(ids+'_div').style.display ='none';
	$(ids+'_show').value=sval;
	$(ids).value=val;
	oncha($(ids+'_show'),$(ids));
}
//================查找列表数据项================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_listdata_mult(obj,events){
  _e = events;
  var e = _e.keyCode ? _e.keyCode : _e.which;
	if(e==13 || e==38 || e==40){
	if($(obj.id+'_div').style.display == 'block'){
		for(s=0;s<$(obj.id+'_listsize').value;s++){
			if($(obj.id+'_list_'+s).isselected=='true'){
				if(event.keyCode==13){//回车
					obj.value = $_mult(obj.id+'_list_'+s).innerHTML;
					$(obj.id+'_div').style.display = 'none';
					break;
				}else if(event.keyCode==38){//向上
					noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpup_mult(obj.id,s);
					break;
				}else if(event.keyCode==40){//向下
					noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpd_mult(obj.id,s);
					break;
				}
			}
		}
	  }else{
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdiv_mult(obj.id);
	  };
	}
}

//=========方向上键==========================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpup_mult(ids,n){
	b = n-1;
	if(b>=0 && b<$(ids+'_show').listsize){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(ids+'_list_'+b),ids);
	}
}
//=========方向下键==========================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpd_mult(ids,n){
	b = n+1;
	if(b>=0 && b<$(ids+'_show').listsize){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(ids+'_list_'+b),ids);
	}
}
//==========按名字选中列表项============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_kup_mult(ids,values){
	for(i=0;i<$(ids+'_show').listsize;i++){
		if($(ids+'_list_'+i).innerHTML==values){
			noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp($(ids+'_list_'+i),ids);
		}
	}
}
//=========失去焦点===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus_mult(ids){
	$(ids+'_but').blur();
	$(ids+'_show').focus();
}
//========清空样式===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_clearb_mult(obj){
	obj.style.color='';
	obj.style.backgroundColor = '';
}
//=======单选框====================================
function noka_tag_FDLKJ4543BSFDKLJ4598734_checkclick_mult(vars){
	if(vars.checked){
	 	vars.checked=false;
	}else if(!vars.checked){
		vars.checked=true;
	}
}
//*****************selectinput********************
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdiv_si(tid){ 
	noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus_si(tid);
	var t = $(tid); 
	var p = $(tid+'_div'); 
	if($(tid+'_div').style.display =='none'){
		$(tid).style.color='#FFFFFF';
		$(tid+'_div').style.width = $(tid+'_listtable').offsetWidth;
		$(tid).style.backgroundColor = '#000066';
		var values = $(tid).value;
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_si(tid,values);
		var top1 = noka_tag_LJKFS24783SFJKL_getTop(t);
		var left1 = noka_tag_LJKFS24783SFJKL_getLeft(t);
		var top2 = 0;
		var left2 = 0;
		if (p.offsetParent != null) {
			top2 = noka_tag_LJKFS24783SFJKL_getTop(p.offsetParent);
			left2 = noka_tag_LJKFS24783SFJKL_getLeft(p.offsetParent);
		}
		$(tid+'_div').style.left=(left1 - left2);
		$(tid+'_div').style.top=(top1 + t.offsetHeight - top2)+3;
		$(tid+'_div').style.display = 'block';
	}else{
		$(tid+'_div').style.display = 'none';
		$(tid).style.color='';
		$(tid).style.backgroundColor = '';
	}
}
// ==========按名字选中列表项============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_si(ids,values){ 
 	var iss = false; 
	for(i=0;i<$(ids+'_listsize').value;i++){ 
		if($(ids+'_list_'+i).innerHTML==values){
			noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_si($(ids+'_list_'+i),ids,i);
			iss = true;
		}
	}
	if(!iss){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_si($(ids+'_list_0'),ids,0);
	}
}
//=================隐藏列表=============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_enddiv_si(tid,onbl){
	if($(tid+'_but_isonedit').value=='false' ){
		$(tid).style.color='';
		$(tid).style.backgroundColor = '';
	}
	if($(tid+'_isonedit').value=='true' || $(tid+'_but_isonedit').value=='true' || $(tid+'_div_isonedit').value=='true' ){
	}else{
		$(tid+'_div').style.display = 'none';
		onbl($(tid));
	}
}

//===========改变列表的每行颜色=============
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_si(obj,ids,ins){
	for(i=0;i<$(ids+'_listsize').value;i++){
		$(ids+'_list_'+i).style.backgroundColor = '#FFFFFF';
		$(ids+'_list_'+i).style.color='#000000';
		$(ids+'_list_isselected_'+i).value = 'false'; 
	}
	obj.style.backgroundColor = '#000066';
	obj.style.color='#FFFFFF';
	$(ids+'_list_isselected_'+ins).value = 'true';
}
//===============选择列表数据=============
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_clickhtmlvaluep_si(obj,ids,onch){
	noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus_si(ids);
	$(ids).value = obj.innerHTML;
	$(ids+'_div').style.display = 'none';
	$(ids).style.backgroundColor = '#000066';
	$(ids).style.color='#FFFFFF';
	try{onch($(ids));}catch(e){};
}
//================查找列表数据项================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_listdata_si(obj,events){
  _e = events;
  var e = _e.keyCode ? _e.keyCode : _e.which;
	if(e==13 || e==38 || e==40){
	if($(obj.id+'_div').style.display == 'block'){
		for(s=0;s<$(obj.id+'_listsize').value;s++){
			if($(obj.id+'_list_isselected_'+s).value=='true'){
				if(e==13){//回车
					obj.value = $(obj.id+'_list_'+s).innerHTML;
					$(obj.id+'_div').style.display = 'none';
					break;
				}else if(e==38){//向上
					noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpup_si(obj.id,s);
					break;
				}else if(e==40){//向下
					noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpd_si(obj.id,s);
					break;
				}
			}
		}
	  }else{
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdiv_si(obj.id);
	  };
	}else{
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_clearb_si(obj);
		for(i=0;i<$(obj.id+'_listsize').value;i++){
			var valuen = $(obj.id+'_list_'+i).innerHTML;
			valuen = valuen.substring(0,obj.value.length);
			if(valuen==obj.value){
				noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_si($(obj.id+'_list_'+i),obj.id,i);
				noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdivkeyup_si(obj.id);
				break;
			}
		}
	}
}
//===========录入傎时显示列表===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdivkeyup_si(tid){
	var values = $(tid).value;
	var t = $(tid); 
	var p = $(tid+'_div'); 
		var top1 = noka_tag_LJKFS24783SFJKL_getTop(t);
		var left1 = noka_tag_LJKFS24783SFJKL_getLeft(t);
		var top2 = 0;
		var left2 = 0;
		if (p.offsetParent != null) {
			top2 = noka_tag_LJKFS24783SFJKL_getTop(p.offsetParent);
			left2 = noka_tag_LJKFS24783SFJKL_getLeft(p.offsetParent);
		}
	noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_kup_si(tid,values);
	$(tid+'_div').style.width = $(tid+'_listtable').offsetWidth;
	$(tid+'_div').style.left=(left1 - left2);
	$(tid+'_div').style.top=(top1 + t.offsetHeight - top2)+3;
	$(tid+'_div').style.display = 'block';
}
//=========方向上键==========================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpup_si(ids,n){
	b = n-1;
	if(b>=0 && b<$(ids+'_listsize').value){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_si($(ids+'_list_'+b),ids,b);
	}
}
//=========方向下键==========================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpd_si(ids,n){
	b = n+1;
	if(b>=0 && b<$(ids+'_listsize').value){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_si($(ids+'_list_'+b),ids,b);
	}
}
//==========按名字选中列表项============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_kup_si(ids,values){
	for(i=0;i<$(ids+'_listsize').value;i++){
		if($(ids+'_list_'+i).innerHTML==values){
			noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_si($(ids+'_list_'+i),ids,i);
		}
	}
}
//=========失去焦点===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus_si(ids){
	$(ids+'_but').blur();
	$(ids).focus();
}
//========清空样式===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_clearb_si(obj){
	obj.style.color='';
	obj.style.backgroundColor = '';
}
//***************************************************
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdiv_mult_musi(tid){ 
	noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus_mult_musi(tid);
		var t = $(tid+'_show'); 
		var th = $(tid); 
		var p = $(tid+'_div'); 
	if($(tid+'_div').style.display =='none'){
		$(tid+'_show').style.color='#FFFFFF';
		$(tid+'_div').style.width = $(tid+'_listtable').offsetWidth;
		$(tid+'_show').style.backgroundColor = '#000066';
		var values = th.value;
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_mult_musi(tid,values);
		var top1 = noka_tag_LJKFS24783SFJKL_getTop(t);
		var left1 = noka_tag_LJKFS24783SFJKL_getLeft(t);
		var top2 = 0;
		var left2 = 0;
		if (p.offsetParent != null) {
			top2 = noka_tag_LJKFS24783SFJKL_getTop(p.offsetParent);
			left2 = noka_tag_LJKFS24783SFJKL_getLeft(p.offsetParent);
		}
		$(tid+'_div').style.left=(left1 - left2);
		$(tid+'_div').style.top=(top1 + t.offsetHeight - top2)+3;
		$(tid+'_div').style.display = 'block';
	}else{
		$(tid+'_div').style.display = 'none';
		t.style.color='';
		t.style.backgroundColor = '';
	}
}
//==========按名字选中列表项============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_mult_musi(ids,values){ 
	for(i=0;i<$(ids+'_listsize').value;i++){ 
	 	$(ids+'_checkbox_'+i).checked=false;
	}
	for(i=0;i<$(ids+'_listsize').value;i++){ 
	 for(s=0;s<$(ids).value.split(',').length;s++){
	 	if(values.split(',')[s]==$(ids+'_checkbox_'+i).value){
	 		$(ids+'_checkbox_'+i).checked=true;
	 	}
	 }
	}
}
//=================隐藏列表=============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_enddiv_mult_musi(tid,onbcl){
	if($(tid+'_but_isonedit').value=='false' ){
		$(tid+'_show').style.color='';
		$(tid+'_show').style.backgroundColor = '';
	}
	if($(tid+'_show_isonedit').value=='true' || $(tid+'_but_isonedit').value=='true' || $(tid+'_div_isonedit').value=='true' ){
	}else{
		$(tid+'_div').style.display = 'none';
		onbcl($(tid+'_show'));
	}
}
//===========改变列表的每行颜色=============
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_mult_musi(obj,ids){
	for(i=0;i<$(ids+'_listsize').value;i++){
		$(ids+'_list_'+i).style.backgroundColor = '#FFFFFF';
		$(ids+'_list_'+i).style.color='#000000';
		$(ids+'_list_'+i+'_isselected').value= 'false'; 
	}
	obj.style.backgroundColor = '#000066';
	obj.style.color='#FFFFFF';
	$(obj.id+'_isselected').value = 'true';
}
//===============选择列表数据=============
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_clickhtmlvaluep_mult_musi(obj,ids,checkids,onchan){
	$(ids+'_show').style.backgroundColor = '#000066';
		if($(checkids).checked)
			$(checkids).checked=false;
		else
			$(checkids).checked=true;
		$(ids+'_show').style.color='#FFFFFF';
		$(ids+'_show').focus();
	var strvaue='';
	var showvaue='';
	for(i=0;i<$(ids+'_listsize').value;i++){ 
		if($(ids+'_checkbox_'+i).checked){
			strvaue+=','+$(ids+'_checkbox_'+i).value;
			showvaue+=','+$(ids+'_list_'+i+'_text').value;
		}
	}
	 $(ids+'_show').value=showvaue.substring(1);
	 $(ids).value=strvaue.substring(1);
	 onchan($(ids+'_show'),$(ids));
}
//================查找列表数据项================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_listdata_mult_musi(obj,events){
  _e = events;
  var e = _e.keyCode ? _e.keyCode : _e.which;
	if(e==13 || e==38 || e==40){
	if($(obj.id+'_div').style.display == 'block'){
		for(s=0;s<$(obj.id+'_listsize').value;s++){
			if($(obj.id+'_list_'+s+'_isselected').value=='true'){
				if(e==13){//回车
					obj.value = $_mult(obj.id+'_list_'+s).innerHTML;
					$(obj.id+'_div').style.display = 'none';
					break;
				}else if(e==38){//向上
					noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpup_mult_musi(obj.id,s);
					break;
				}else if(e==40){//向下
					noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpd_mult_musi(obj.id,s);
					break;
				}
			}
		}
	  }else{
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdiv_mult_musi(obj.id);
	  };
	}else{
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_clearb_musi(obj);
		for(i=0;i<$(obj.id+'_listsize').value;i++){
			var valuen = $(obj.id+'_list_'+i).innerHTML;
			valuen = valuen.substring(0,obj.value.length);
			if(valuen==obj.value){
				noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_mult_musi($(obj.id+'_list_'+i),obj.id);
				noka_tag_FKLSD231B7821GFASDHG237SDHJ_showdivkeyup_mult_musi(obj.id);
				break;
			}
		}
	}
}
//=========方向上键==========================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpup_mult_musi(ids,n){
	b = n-1;
	if(b>=0 && b<$(ids+'_listsize').value){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_musi($(ids+'_list_'+b),ids);
	}
}
//=========方向下键==========================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_snbpd_mult_musi(ids,n){
	b = n+1;
	if(b>=0 && b<$(ids+'_listsize').value){
		noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_musi($(ids+'_list_'+b),ids);
	}
}
//==========按名字选中列表项============================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_selectedlist_kup_mult_musi(ids,values){
	for(i=0;i<$(ids+'_listsize').value;i++){
		if($(ids+'_list_'+i).innerHTML==values){
			noka_tag_FKLSD231B7821GFASDHG237SDHJ_bgcolorp_musi($(ids+'_list_'+i),ids);
		}
	}
}
//=========失去焦点===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_bluerfocus_mult_musi(ids){
	$(ids+'_but').blur();
	$(ids+'_show').focus();
}
//========清空样式===================================
function noka_tag_FKLSD231B7821GFASDHG237SDHJ_clearb_mult_musi(obj){
	obj.style.color='';
	obj.style.backgroundColor = '';
}
//=======单选框====================================
function noka_tag_FDLKJ4543BSFDKLJ4598734_checkclick_mult_musi(vars){
	if(vars.checked){
	 	vars.checked=false;
	}else if(!vars.checked){
		vars.checked=true;
	}
}